package cn.wyx.action;

import java.util.ArrayList;
import java.util.List;

import cn.wyx.entity.User;
import cn.wyx.serves.UserServes;

public class UserAction extends BaseAction{
    private String username;
    private String userpass;
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getUserpass() {
		return userpass;
	}
	public void setUserpass(String userpass) {
		this.userpass = userpass;
	}

	public String userRegist(){
		UserServes userServes=new UserServes();
		boolean flag=userServes.userRegist(username,userpass);
		if (flag) {
			return SUCCESS;
		}else{
			return ERROR;
		}
	}
	
	public String userSelectAll(){
		List<User> userList=new ArrayList<User>();
		UserServes userServes=new UserServes();
		user=userServes.userSelectAll(username);
		return SUCCESS;
	}
	private User user;
	public User getUser() {
		return user;
	}
	
}
